<?php namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

class GovernmentBase extends Model {

	//
	protected $table = 'government_base';
	protected $fillable = ['uid','company_name','group_code','contact_person','contact_number','province','city','area','address','zcode','fax','email','induction','regist_copy','logo', 'description'];

	public function registProvince()
	{
		return $this->hasOne("App\Models\Area", "area_id", "province");
	}

	public function registCity()
	{
		return $this->hasOne("App\Models\Area", "area_id", "city");
	}

	public function registArea()
	{
		return $this->hasOne("App\Models\Area", "area_id", "area");
	}

}
